<%@page import="domain.Things"%>
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>My JSP 'showInformation.jsp' starting page</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<meta http-equiv="content-type" content="text/html;charset=UTF-8">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
     <link href="css/index.css" rel="stylesheet">
  </head>
  
  <body>
   	<div >
  		<h3  class="sgin_title" align="center" >南通大学/失物招领</h3>
    </div>
      <form action="/Found/servlet/querryInfo">
   		 <table class="table_style" cellspacing="0" cellpadding="4" align="center" border="1" size="20pt" border="0" id="GridView1" >	
  
		<tr style="color:White;background-color:#5D7B9D;font-weight:bold;">
			<th scope="col">编号</th><th scope="col">日期</th><th scope="col">类别</th><th scope="col" style="width:300px">详细描述</th><th scope="col" style="width:300px">拾取地点</th><th scope="col">查看/认领</th>
		</tr>
		
		
		<% List<Things> list=(List<Things>)request.getAttribute("thinglist");
		String b=null;
		String a=null;
		String c=null;
		if(list!=null){
			for(Things t:list){
			if(t.getDescrible().length()>12){
			 b=t.getDescrible().substring(0,12)+"···";
			
			}else{
			 b=t.getDescrible();
			
			}
			if(t.getType().length()>12){
			 a=t.getType().substring(0,12)+"···";
			 }else{
			  a=t.getType();
			 }
			 if(t.getPlace().length()>12){
 			  c=t.getPlace().substring(0,12)+"···";			 
			 }else{
			  c=t.getPlace();
			 }
		 %>
		 <tr style="color:#333333;background-color:#F7F6F3;font-size:9pt;"> 
		<th scope="col"><%=2016+t.getTime().replaceAll("-", "")+t.getId() %></th><th scope="col"><%=t.getTime() %></th><th scope="col"><%=a %></th><th scope="col"><%=b%></th><th scope="col"><%=c%></th><th scope="col"><a href=servlet/seeInfo?id=<%=t.getId() %>>认领</th>
		</tr>
		<%
		}
			}else{
			response.sendRedirect("servlet/querryInfo");
			}
		 %>
		 </table>
		 
<table   class="table-infor-record-style" id="page" >
  	   
  <tr>
  <td style="width:140px"></td>
    <th width="113" >第${currentpage}页/共${page} 页</th>
    
    <td><a href="servlet/querryInfo?drip=1&maintype=${maintype}">首页</a>  
    	    <a href="servlet/querryInfo?drip=${page}&maintype=${maintype}">尾页</a> 
    	   
    	   <a href="servlet/querryInfo?drip=${currentpage+1}&maintype=${maintype}">下一页</a>
    	  
    	   <a href="servlet/querryInfo?drip=${currentpage-1}&maintype=${maintype}">上一页</a>  
    	   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    	类别搜索：<input type="text" name="maintype" style="width:120px">		 <input type="submit" value="go!">
    	</td>
    	
  </tr>
</table>
		 
		    </tr>
		 </table>
	  </form>
  </body>
</html>
